package edu.cmu.ibill.databeans;

import java.util.Date;

/**
 * Bean class for Debt table.
 * 
 * @author Yunkai Zhang
 * 
 */

public class Debt {
	// Debt id
	private int id = -1;
	// The id of the bill, which records the payment
	private int payedbillId;
	// The id of the bill, which records the income
	private int owedbillId;
	// The user id of the user who paid the bill
	private int payedId;
	// The user id of the user who owed the bill
	private int owedId;
	// The total amount of the bill
	private double amount;
	// The description of the text
	private String description;
	// The Date of the debt
	private Date date;

	/**
	 *  Constructor
	 */
	public Debt() {
		;
	}

	/**
	 *  Constructor
	 * @param id
	 */
	public Debt(int id) {
		this.id = id;
	}

	/**
	 *  Set debt id
	 * @param id
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 *  Set Associated payed bill id
	 * @param billid
	 */
	public void setPayedBillId(int bid) {
		this.payedbillId = bid;
	}
	
	/**
	 *  Set Associated owed bill id
	 * @param billid
	 */
	public void setOwedBillId(int bid) {
		this.owedbillId = bid;
	}


	/**
	 *  Set the payed user id
	 * @param payedId
	 */
	public void setPayedId(int pid) {
		this.payedId = pid;
	}
	
	/**
	 *  Set the user id who owed the bill
	 * @param owedId
	 */
	public void setOwedId(int oid) {
		this.owedId = oid;
	}

	/**
	 *  Set the amonut of this bill
	 * @param amount
	 */
	public void setAmount(double a) {
		this.amount = a;
	}

	/**
	 *  Set the description
	 * @param description
	 */
	public void setDescription(String d) {
		this.description = d;
	}

	/**
	 * Set Date of the bill
	 * @param date
	 */
	public void setDate(Date date) {
		this.date = date;
	}

	/**
	 * Get the Debt id
	 * @return id
	 */
	public int getId() {
		return id;
	}

	/**
	 * Get the associated bill id
	 * @return billid
	 */
	public int getPayedBillId() {
		return payedbillId;
	}
	
	/**
	 * Get the associated bill id
	 * @return billid
	 */
	public int getOwedBillId() {
		return owedbillId;
	}


	/**
	 * Get the user id of the user who payed the bill
	 * @return payedId
	 */
	public int getPayedId() {
		return this.payedId;
	}

	/**
	 * Get the user id of the user who owed the bill
	 * @return owedId
	 */
	public int getOwedId() {
		return this.owedId;
	}

	/**
	 * Get the description of the debt
	 * @return description
	 */
	public String getDescription() {
		return this.description;
	}

	/**
	 * Get the date
	 * @return date
	 */
	public Date getDate() {
		return date;
	}

	/**
	 * Get the total amount of the bill
	 * @return amount
	 */
	public double getAmount() {
		return amount;
	}

}
